package star.oath.project.building.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import star.oath.project.item.model.EquipDef;
import star.oath.project.item.model.MiscDef;

import java.io.Serializable;

@Data
@TableName("building_sale")
public class BuildingSale extends Model<BuildingSale> implements Serializable {

    private static final long serialVersionUID = 1L;

    private String buildingCode;
    private String itemCode;
    private Integer isMisc;
    private Integer maxNum;
    private Integer probability;

    @TableField(exist = false)
    private EquipDef equipInfo;
    @TableField(exist = false)
    private MiscDef miscInfo;

    public boolean isMisc() {
        return isMisc == 1;
    }

}
